package ventanas;

import javax.swing.JFrame;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JTextField;
import java.awt.Font;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;


public class VentanaBuscarPalabraPubli extends JFrame{
	private JTextField txtPalabra;
	public VentanaBuscarPalabraPubli() {
		getContentPane().setLayout(new BorderLayout(0, 0));
		
		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.NORTH);
		
		JLabel lblIntroduzcaCualquierPalabra = new JLabel("Introduzca cualquier palabra de la publicaci\u00F3n que est\u00E1 buscando.");
		lblIntroduzcaCualquierPalabra.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 14));
		panel.add(lblIntroduzcaCualquierPalabra);
		
		JPanel panel_1 = new JPanel();
		getContentPane().add(panel_1, BorderLayout.SOUTH);
		
		JButton btnBuscar = new JButton("Buscar");
		btnBuscar.setFont(new Font("Tahoma", Font.BOLD, 16));
		panel_1.add(btnBuscar);
		
		JPanel panel_2 = new JPanel();
		getContentPane().add(panel_2, BorderLayout.CENTER);
		GridBagLayout gbl_panel_2 = new GridBagLayout();
		gbl_panel_2.columnWidths = new int[]{126, 246, 0};
		gbl_panel_2.rowHeights = new int[]{23, 0, 0, 0};
		gbl_panel_2.columnWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
		gbl_panel_2.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};
		panel_2.setLayout(gbl_panel_2);
		
		txtPalabra = new JTextField();
		txtPalabra.setFont(new Font("Tahoma", Font.PLAIN, 14));
		txtPalabra.setText("palabra a buscar");
		GridBagConstraints gbc_txtPalabra = new GridBagConstraints();
		gbc_txtPalabra.insets = new Insets(0, 0, 5, 0);
		gbc_txtPalabra.anchor = GridBagConstraints.NORTHWEST;
		gbc_txtPalabra.gridx = 1;
		gbc_txtPalabra.gridy = 1;
		panel_2.add(txtPalabra, gbc_txtPalabra);
		txtPalabra.setColumns(20);
		this.setSize(475,160);
		this.setVisible(true);
	}

	public static void main(String[] args) throws ClassNotFoundException,
	InstantiationException, IllegalAccessException,
	UnsupportedLookAndFeelException {
UIManager
		.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
		new VentanaBuscarPalabraPubli();
	}
}

